const mongoose= require('mongoose')
const Schema = mongoose.Schema

const MessageSchema = new Schema({
  // 留言人昵称
  name: {
    type: String,
    require: true
  },
  // 邮箱
  email: {
    type: String,
    require: true
  },
  // 留言内容
  content: {
    type: String,
    require: true
  },
  // 留言时间
  createTime: {
    type: Number,
    require: true
  }
})

module.exports =mongoose.model('MessageSchema', MessageSchema, 'message')